﻿using Ninject;
using Peninsula.Web.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Peninsula.Web.Controllers
{
    public class CommonController : HouseholdsBaseController
    {
        [Inject]
        public IServices.ISiteFileService SiteFileService { get; set; }


        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public JsonResult DeleteFile(string id)
        {
            try
            {
                SiteFileService.DeleteFile(id);
                return JsonAllowGet(new { success = "文件删除成功" });
            }
            catch (Exception ex)
            {
                return JsonAllowGet(new { error = ex.Message });
            }
        }
    }
}